export default {
  methods: {
    getApp (appObj,apkObj) { // 获取app名字和包名
      return new Promise((resolve, reject) => {
        let option = {
          param: {}       
        }
        this.$axios.post(this.$action.getApp,option).then(res => {
          if (res.code == 200) {
            let appData=[];
            let apkData=[];
            res.data.forEach(value => {
              appData.push({value: value.appName, label: value.appName});
              apkData.push({value: value.appPackage, label: value.appPackage});
            })
            let app={
              appName:appData,
              appPackage:apkData
            }
            resolve(app);
            // if(appObj){this.$set(appObj,'option',appData);}
            // if(apkObj){this.$set(apkObj,'option',apkData);}    
          }
        })
      })
    }
  }
}